package com.translate.web.api.controller;

import java.util.List;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.response.vo.ResponseModel;
import com.param.impl.IdParam;
import com.translate.web.service.IOrderPicService;
import com.translate.vo.OrderPicVO;

@RestController
@RequestMapping("orderPic")
public class OrderPicController  {
	
	private IOrderPicService service;
	
	public OrderPicController(IOrderPicService service) {
		this.service = service;
	}

	/**
	 * 获取订单图片
	 * @param <VO>
	 * @param param
	 * @return
	 */
	@PostMapping("getOrderPics")
	public ResponseModel<List<OrderPicVO>> getOrderPics(@RequestBody @Validated IdParam param) {
		
		return ResponseModel.success(this.service.getPics(param.getId(), OrderPicVO.class));
	} 
	
}